﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UBCon.RibbonDemo.Models
{
    /// <summary>
    /// General content model class for RibbonGallery.
    /// </summary>
    public class ContentModel:INotifyPropertyChanged
    {
        private string image;

        private double imageHeight, imageWidth;

        /// <summary>
        /// Gets or sets image source.
        /// </summary>
        public string Image 
        {
            get 
            {
                return this.image;
            }
            set 
            {
                this.image = value;
                this.OnPropertyChanged("Image");
            }
        }

        /// <summary>
        /// Gets or sets header.
        /// </summary>
        public string Header { get; set; }

        /// <summary>
        /// Gets or sets image height.
        /// </summary>
        public double ImageHeight 
        {
            get 
            {
                return imageHeight;
            }
            set 
            {
                imageHeight = value;
                OnPropertyChanged("ImageHeight");
            }
        }

        /// <summary>
        /// Gets or sets image's width.
        /// </summary>
        public double ImageWidth 
        {
            get 
            {
                return imageWidth;
            }
            set 
            {
                imageWidth = value;
                OnPropertyChanged("ImageWidth");
            }
        }

        private void OnPropertyChanged(string propertyName) 
        {
            if (this.PropertyChanged != null) 
            {
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}
